/*
 * Copyright (c) 2023 Cshoo Org. All Rights Reserved.
 */

package org.cshoo.tattoo.embed.infra.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import java.util.Date;

/**
 * PO基类，mysql数据库实体表必建字段
 * 其他DTO，BO需要也可以继承
 *
 * @author 杨翼
 * @since 1.0
 */
@EqualsAndHashCode(callSuper = true)
@Data
@MappedSuperclass
public abstract class BaseEntity extends BaseRelation {

    @Column(name = "code", length = 100)
    private String code;

    @Column(name = "name", length = 100)
    private String name;

    @Column(name = "description", length = 4000)
    private String description;

    @Column(name = "Last_updated_by", length = 100)
    private String lastUpdatedBy;

    @Column(name = "last_update_time", columnDefinition = "TIMESTAMP null default null")
    private Date lastUpdateTime;
}
